<html>
<head>
    <title>Title</title>
    <script type="text/javascript" charset="utf-8" src="/ue/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/ue/ueditor.all.min.js"> </script>
    <script type="text/javascript" charset="utf-8" src="/ue/lang/zh-cn/zh-cn.js"></script>
    <script src="/js/jquery-1.11.1.min.js"></script>
    <script src="/js/jquery.toTop.min.js"></script>

</head>
<body>
<div style="text-align: center;">
    <input id="title" name="title"><button onclick="submit()">发布</button>
</div>
<script id="editor" type="text/plain" style="margin:auto;width:800px;height:500px;"></script>
<button onclick="submit()">发布</button>
<script>
    var ue = UE.getEditor('editor');
    function submit() {
        var title = $("#title").val();
        var content = ue.getContent();
        $.post("service_addArticle.jsp",{title:title,content:content},function(result){
                result = eval("("+result+")");
                if(result.success){
                    alert("成功")
                }else{
                    alert(result.msg);
                }
        }).error(function(){alert("error")})

    }
</script>

</body>
</html>
